{% extends "blog/index.html" %}
{% load i18n admin_static %}
{% block title %}{{ p.title }} | 全文阅读{% endblock %}

# 正文部分
{% block content %}
<div id="content">
    {% if form %}
        {% if form.errors %}
            {{ form.errors }}
        {% else %}
        <form action="" method="POST">{% csrf_token %}
            <div class="form-row">
                {{ form.title.errors }}
                <label for="id_title" class="required">{{ form.title.label }}:</label>
                {{ form.title }}
            </div>
            <div class="form-row">
                {{ form.content.errors }}
                <label for="id_content" class="required">{{ form.content.label }}:</label><br/>
                <textarea rows="30" cols="50" id="id_content" name="content">
                {{ form.content|striptags }}</textarea>
                <script type="text/javascript">CKEDITOR.replace('id_content');</script>
            </div>

            <div class="form-row">
                {{ form.excerpt.errors }}
                <label for="id_excerpt" class="required">{{ form.excerpt.label }}:</label><br/>
                {{ form.excerpt }}
            </div>
            <div class="form-row">
                {{ form.name.errors }}
                <label for="id_name" class="required">{{ form.name.label }}:</label>
                {{ form.name }}
            </div>
            <div class="form-row">
                {{ form.password.errors }}
                <label for="id_password" class="required">{{ form.password.label }}:</label>
                {{ form.password }}
            </div>

            <div class="submit-row">
                <label>&nbsp;</label><input type="submit" value="{% trans 'Submit' %}" />
            </div>
        </form>
        {% endif %}
    {% endif %}
</div>
{% endblock %}

{% block footer %}{% endblock %}

